package com.longge;

/**
 * @program: my-code
 * @description:
 * @author: longge
 * @create: 2021-05-09 02:58
 */
public class SumNums {
    public int sumNums(int n) {
        return n+n*(n-1)/2;
    }

    public static void main(String[] args) {
        int i = new SumNums().sumNums(3);
        System.out.println(i);
    }
}
